package com.cspm.common.core;

import org.springframework.context.annotation.Bean;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.spi.DocumentationType;
import springfox.documentation.spring.web.plugins.Docket;
import springfox.documentation.swagger2.annotations.EnableSwagger2;

/**
 * Swagger 配置工具
 * Created by CHQIU on 2017-04-17.
 */
@EnableSwagger2
public class ApplicationSwaggerConfig {
    @SuppressWarnings("deprecation")
    @Bean
    public Docket addUserDocket() {
        Docket docket = new Docket(DocumentationType.SWAGGER_2);
        ApiInfo apiInfo = new ApiInfo("活动平台 API", "活动平台，API",
                "V0.1", "192.168.1.164", "Chen Quan", "Apache 2.0",
                "http://www.apache.org/licenses/LICENSE-2.0.html");
        docket.apiInfo(apiInfo);
        return docket;
    }
}
